package com.group7.mall.convert;

import com.group7.mall.dto.*;
import com.group7.mall.entity.TbCustomerService;
import com.group7.mall.entity.TbUserOrder;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface OrderConverter {

    OrderConverter INSTANCE = Mappers.getMapper(OrderConverter.class);

    UserOrderDetailDto convertTbUserOrderToUserOrderDetailDto(TbUserOrder tbUserOrder);

    SellerOrderDetailDto convertTbUserOrderToSellerOrderDetailDto(TbUserOrder tbUserOrder);

    TbUserOrder convertUserOrderDtoToTbUserOrder(UserOrderDto userOrderDto);

    UserOrderDto convertTbUserOrderToUserOrderDto(TbUserOrder tbUserOrder);

    UserCartAddDto convertUserOrderDtoToUserCartRequest(UserOrderDto userOrderDto);

    List<UserOrderPreviewDto> convertTbUserOrderListToUserOrderPreviewDtoList(List<TbUserOrder> tbUserOrderList);

    List<SellerOrderPreviewDto> convertTbUserOrderListToSellerGoodsPreviewDtoList(List<TbUserOrder> tbUserOrderList);

    TbCustomerService convertUserOrderDtoToTbCustomerService(UserOrderDto userOrderDto);

    TbCustomerService convertTbUserOrderToTbCustomerService(TbUserOrder tbUserOrder);
}
